/**
 * Dear programmer:
 * When I wrote this code, only god and I knew how it worked.
 * Now, only god knows it!
 *
 * @author: Pegasus  Date: 2018-12-13 Time: 22:41
 *
 * 通用
 *
 * 列表按钮
 */

import React, {Component} from 'react';
import {
    TouchableHighlight,
} from 'react-native';
import PropTypes from 'prop-types';

export default class HS_TouchableHighlight extends Component {

    static propTypes = {
        onPress:PropTypes.func,
        underlayColor:PropTypes.string,
    };

    static defaultProps = {
        underlayColor: '#f1f1f1'
    }

    render() {
        return (
            <TouchableHighlight onPress={this.props.onPress} underlayColor={this.props.underlayColor} >
                {this.props.children}
            </TouchableHighlight>
        )
    }

}
